package com.yonyou.pmclouds.personnel.rmiitf;

import com.yonyou.pmclouds.basecom.entity.PageObject;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.personnel.entity.PersonnelSearchConditionVO;
import com.yonyou.pmclouds.personnel.entity.PersonnelVO;

import java.util.Set;

/**
 * @Author chulf
 * @Date 2020/4/13
 * @Description
 **/
public interface PersonnelQuery {

    /**
     * 通过企业主键查询人员信息
     *
     * @return
     */
    PersonnelVO[] queryPersonnelsByPkEtp(String pkEnterprise);

    /**
     * 根据用户主键批量查询人员信息
     * @param userIds 用户主键
     * @return 人员信息
     */
    PersonnelVO[] queryByUserIds(String[] userIds);

    /**
     * 通过企业主键查询人员信息
     *
     * @return
     */
    PersonnelVO[] queryPersonnelsByPkEtps(String[] pkEnterprise);



    /**
     * 通过用户查询 对应管理的企业主键
     * @param userId
     * @return
     */
    Set<String> queryEtpsByUserId(String userId);


    boolean queryPersonnelRef(String code, String[] ids);


    /**
     * 校验是否被引用
     * @param id
     * @return
     * @throws BusinessException
     */
    boolean queryRefCheck(String id) throws BusinessException;

    PageObject<PersonnelVO> search(PersonnelSearchConditionVO conditionVO) throws BusinessException;


}
